package com.lm.hessian.example;

import com.caucho.hessian.client.HessianProxyFactory;
import com.lm.hessian.inter.HelloService;

import java.net.MalformedURLException;

public class HessianClientApp {
    public static void main(String[] args) throws MalformedURLException {
        String url = "http://localhost:9002/hessian/helloService";
        HessianProxyFactory factory = new HessianProxyFactory();
        HelloService helloService = (HelloService) factory.create(HelloService.class, url);

        String result = helloService.sayHello("Alice");
        System.out.println(result);
    }
}
